@import './base.css';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #f5f5f5;
  color: #333;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  height: 100vh;
  overflow: hidden;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #c62828 0%, #d84315 100%);
  color: white;
}

/* 页面容器 */
.page-container {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
  position: relative;
}

/* 底部播放控制栏 */
.player-control-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(198, 40, 40, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  padding: 0 15px;
  z-index: 100;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 -5px 15px rgba(198, 40, 40, 0.3);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.player-info {
  flex: 1;
  overflow: hidden;
  color: white;
}

.song-name {
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.control-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: white;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.play-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #c62828;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 播放页面 */
.player-page {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.player-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.menu-btn, .back-btn {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.menu-btn:hover, .back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.page-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}

.lyrics-container {
  flex: 1;
  height: 70%;
  overflow-y: auto;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.lyrics {
  font-size: 18px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.9);
}

.no-lyrics {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
}

.progress-container {
  margin: 20px 0;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  position: relative;
  margin-bottom: 10px;
  cursor: pointer;
}

.progress {
  height: 100%;
  background: white;
  border-radius: 3px;
  width: 30%;
  position: relative;
}

.progress-handle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.time-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 20px 0;
}

.player-controls .control-btn {
  font-size: 24px;
  color: white;
}

.player-controls .play-btn {
  width: 70px;
  height: 70px;
  font-size: 28px;
}

.play-mode {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.mode-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 12px;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.9);
  color: #c62828;
  font-weight: bold;
}

/* 菜单页面 */
.menu-page {
  padding: 20px;
  height: 100%;
  background: linear-gradient(135deg, #c62828 0%, #d84315 100%);
}

.menu-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.menu-item:active {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding-left: 15px;
}

.menu-item:last-child {
  border-bottom: none;
}

/* 搜索页面 */
.search-page {
  padding: 20px;
  height: 100%;
  background: linear-gradient(135deg, #c62828 0%, #d84315 100%);
}

.search-input {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 歌单页面 */
.playlist-page {
  padding: 20px;
  height: 100%;
  background: linear-gradient(135deg, #c62828 0%, #d84315 100%);
}

.playlist-item {
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
}

.playlist-item:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.2);
}

.playlist-item::before {
  content: "♫";
  margin-right: 12px;
  font-size: 20px;
}

/* 歌曲列表页面 */
.songlist-page {
  padding: 20px;
  height: 100%;
  background: linear-gradient(135deg, #c62828 0%, #d84315 100%);
}

.song-item {
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.song-item:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.2);
}

.song-info {
  flex: 1;
}

.song-name {
  font-size: 16px;
  margin-bottom: 5px;
  color: white;
}

.song-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.loading {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.8);
}

.hidden {
  display: none;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}